package com.huiyujiaoyu.powertime.ui.my;

import android.content.Context;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;

import com.huiyujiaoyu.base.BaseActivity;
import com.huiyujiaoyu.powertime.R;
import com.huiyujiaoyu.powertime.model.UserInfoBean;
import com.huiyujiaoyu.util.ActivityUtil;
import com.huiyujiaoyu.util.Constant;
import com.huiyujiaoyu.util.GlideUtil;
import com.huiyujiaoyu.util.StringUtils;
import com.huiyujiaoyu.widget.LlkjToolBar;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by win7 on 2017/6/18.
 * 我的收藏
 */

public class MyVip2Activity extends BaseActivity {
    @BindView(R.id.toolbar)
    LlkjToolBar mToolbar;
    @BindView(R.id.iv_touxiang)
    ImageView mIvTouxiang;
    @BindView(R.id.tv_name)
    TextView mTvName;
    @BindView(R.id.tv_endtime)
    TextView mTvEndtime;
    private int type;

    public static void launch(Context context) {
        ActivityUtil.startActivity(context, MyVip2Activity.class);
    }

    @Override
    protected void initView() {
        super.initView();
        setToolbar(mToolbar);
        mToolbar.setToolBar("我的VIP", true, "", R.mipmap.icon_titlebar_back, false, "", LlkjToolBar.isNull);
        type = getIntent().getIntExtra(Constant.DATA, 0);
        mToolbar.setTitleBg(android.R.color.transparent);
        GlideUtil.loadCircleImg(mIvTouxiang, StringUtils.getFullUrl(UserInfoBean.getInstance().getHeadImg()));
        mTvName.setText(UserInfoBean.getInstance().getNickName());
        mTvEndtime.setText(UserInfoBean.getInstance().getExpiry_date()+"到期");

    }

    @Override
    protected void initListener() {
        super.initListener();
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_vip2;
    }

}
